arraydeque
A circular buffer with fixed capacity. Requires Rust 1.59+.
This crate is inspired by bluss/arrayvec
Documentation
Usage
First, add the following to your Cargo.toml
:
[]
= "0.5"
Next, add this to your crate root:
extern crate arraydeque;
Currently arraydeque by default links to the standard library, but if you would
instead like to use arraydeque in a #![no_std]
situation or crate you can
request this via:
[]
= { = "0.4", = false }
Example
extern crate arraydeque;
use ArrayDeque;
Changelog
-
0.5.1 Make
ArrayDeque::new()
a const fn. -
0.5.0 Support consnt generic capacity. Remove
use_generic_array
feature. -
0.4.5 Update
generic-array
to0.12
. -
0.4.4 Fix UB:
Some(ArrayDeque::new(xs)).is_some() == false
. (#12) -
0.4.3 Add support for
generic-array
underuse_generic_array
feature. -
0.4.1 Capacity now equal to backend_array.len().
-
0.3.1 Add behaviors:
Saturating
andWrapping
.
Contribution
All kinds of contribution are welcomed.
- Issues. Feel free to open an issue when you find typos, bugs, or have any question.
- Pull requests. New collection, better implementation, more tests, more documents and typo fixes are all welcomed.
License
Licensed under MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)